This patent application is related to U.S. patent applications with Ser. Nos. 09/808,713, filed Mar. 14, 2001; 09/808,910 filed Mar. 14, 2001; 09/808,711 filed Mar. 14, 2001, each of which is incorporated herein by reference and for all purposes.
This invention relates to parity operations in redundant disk drive systems, and particularly to improved stripe-based processing methods and arrangements in such systems.
Modem, high-capacity data storage systems often utilize a plurality of physical disk drives for redundant storage of data. Such arrangements speed-up data access and protect against data loss that might result from the failure of any single disk.
There are two common methods of storing redundant data. According to the first or xe2x80x9cmirrorxe2x80x9d method, data is duplicated and stored on two separate areas of the storage system. In a disk array, for example, identical data is stored on two separate disks. This method has the advantages of high performance and high data availability. However, the mirror method is also relatively expensive, effectively doubling the cost of storing data.
In the second or xe2x80x9cparityxe2x80x9d method, a portion of the storage area is used to store redundant data, but the size of the redundant storage area is less than the remaining storage space used to store the original data. For example, in a disk array having six disks, five disks might be used to store data, with the sixth disk being dedicated to storing redundant data, which is referred to as xe2x80x9cparityxe2x80x9d data. The parity data allows reconstruction of the data from one data disk, using the parity data in conjunction with the data from surviving disks. The parity method is advantageous because it is less costly than the mirror method, but it also has lower performance and availability characteristics in comparison to the mirror method.
This invention involves storing redundant data according to parity techniques. In conventional disk arrays utilizing parity storage, the space on the storage disks are configured into multiple storage stripes, where each storage stripe extends across the storage disks. Each stripe consists of multiple segments of storage space, where each segment is that portion of the stripe that resides on a single storage disk of the disk array.
FIG. 1 illustrates a conventional disk array 12 having six storage disks 13. In this simplified example, there are five storage stripes extending across the storage disks. FIG. 1 highlights data and storage segments of a single one of these five stripes. Data segments of the indicated stripe are indicated by cross-hatching. The corresponding parity segment of this same stripe is illustrated in solid black. Generally, of the six segments comprising any given stripe, five of the segments are data segments and the sixth segment is a parity segment.
This type of parity storage is referred to as 5+1 parity storage, indicating that there are five data segments for every single parity segment. This scheme is more generally referred to as N+1 grouping, where N is the actual number of data segments in a data stripe.
N+1 redundancy grouping such as illustrated in FIG. 1 protects against the loss of any single physical storage device. If the storage device fails, its data can be reconstructed from the surviving data. The calculations performed to recover the data are straightforward, and are well known. Generally, a single parity segment P is calculated from data segments D0 through DNxe2x88x921 in accordance with the following equation:
P=x0+x1+x2+xNxe2x88x921 
where x0 through xNxe2x88x921 correspond to the data from data segments D0 through DNxe2x88x921. After the loss of any single data segment, its data can be recovered through a straightforward variation of the same equation.
In many systems, however, it is becoming important to protect against the loss of more than a single storage device. Thus, it is becoming necessary to implement N+2 grouping in redundant storage systems.
While N+2 redundancy grouping enhances data protection, it also involves more complex calculations-both in initially calculating parity segments and in reconstructing any lost data segments.
A general form of the N+2 parity computation is as follows:
P=p0x0+p1x1+p2x2+pNxe2x88x921xNxe2x88x921 
Q=q0x0+q1x1+q2x2+qNxe2x88x921xNxe2x88x921 
where:
P is the value of a first parity segment;
Q is the value of a second parity segment;
x0 through xNxe2x88x921 are the values of the data segments
p0 through pNxe2x88x921 and q0 through qNxe2x88x921 are constant coefficients that are particular to a given parity scheme.
These equations form a two-equation system that, by the rules of linear algebra, can potentially solve for any two unknowns xa through Xb, which represent the data from a single stripe of any two failed storage devices. One requirement is that the two sets of coefficients pi and qi be linearly independent. This requirement is met, for example, if p0=1, p1=1, p2=1; etc.; and q0=1, q1=2, q2=3; etc. Other examples are also possible.
The mathematics of N+2 parity are well known and are not the primary subject of this description. However, it is apparent from the brief description given above that N+2 parity computations are significantly more complex than N+1 parity computations. In actual implementations of N+2 disk arrays, this complexity threatens to limit the data throughput of storage device controllers and, consequently, of the overall disk array.
Of particular interest herein, is the need to identify potential performance bottlenecks in the processing of stripe-based data and provide solutions that significantly increase the throughput of the overall system.
In accordance with certain aspects of the present invention, a performance bottleneck has been identified as occurring during conventional processing of stripe-based data. As such, improved methods and arrangements are provided to address the bottleneck and help increase the throughput of the overall stripe-based data processing system.
The above stated needs and others may be met, for example, by a method that includes selectively reading data segments or strips within a stripe-based data storage array, and while reading subsequent data strips, calculating at least one intermediate parity value based on previously read data strips and temporarily storing this latest intermediate parity value in a local buffer. Upon determining a final parity value for the strip, writing the final parity value to an external memory. Then, upon determining a final parity value for an entire stripe, writing the final parity value to a corresponding parity value data segment in on an applicable disk drive. The method can be employed in a variety of stripe-based data storage arrays. By way of example, the method can be employed in an N+2 disk array to determine P and Q parity values. One of the benefits to this method is that each data segment need only be read from the disk one time, and further, only the final calculated value of each parity value is written to the applicable disks. Hence, the overall system performance is increased by eliminating the need to reread data segments and write/rewrite intermediate parity values to the external memory.